<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateScrollImagesTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('basic_scroll_images', function (Blueprint $table) {
            // 表结构
            $table->bigIncrements('id')->comment('自增ID');
            $table->string('url')->comment('图片自己链接');
            $table->integer('order')->comment('图片显示顺序');
            $table->boolean('is_show')->default(true)->comment('移动端是否显示');
            $table->string('redirect_url')->nullable()->comment('点击图片后跳转图片链接');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('basin_scroll_images');
    }
}
